feat(agent-manager): route peer replies to source sessions - #13877
Merged
Merged
Conversation
…sion-routing # Conflicts: # packages/kilo-vscode/src/agent-manager/orchestration-bridge.ts # packages/kilo-vscode/tests/unit/agent-manager-orchestration-bridge.test.ts
This comment has been minimized.
This comment has been minimized.
marius-kilocode
enabled auto-merge
September 7, 2026 15:15
iscekic
approved these changes
Sep 7, 2026
This was referenced Sep 8, 2026
This was referenced Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Agent Manager prompts could reach another session, but the receiving agent had no reliable reference to the originating session and could not return its result.
Why This Change Was Made
The existing prompt action now carries an optional request-scoped reply reference. The bridge injects peer context, validates the original sender and workspace, routes replies through the existing session queue, and reconstructs routes from persisted peer-request metadata after an extension restart.
User Impact
Agents can send a prompt to another Agent Manager session and reply to the exact originating session. Busy sessions queue replies through the normal prompt path, local/sidebar source sessions are supported, and peer payloads are bounded and marked as untrusted data.
Evidence
replyToresponse reached Agent A.The implementation does not add cross-server routing. Reply recovery depends on the persisted peer-request message remaining available in the target session.